//
//  MYGlobal.m
//  PetExchange
//
//  Created by a on 2020/12/17.
//

#import "MYGlobal.h"
#import <AdServices/AdServices.h>

@implementation MYGlobal
+(MYGlobal *)share{
    static MYGlobal *sharedGlobalInstance = nil;
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        sharedGlobalInstance = [[self alloc] init];
    });
    return sharedGlobalInstance;
}

-(id)init{
    self=[super init];
    if (self) {
        self.gyToken = @"";
        [self getgyToken];
        self.wechatFlag = 0;
        self.gwIP = @"";
    }
    return self;
}

- (void)getgyToken{
    NSError *error;
    NSString *token = [AAAttribution attributionTokenWithError:&error];
    if (token!= nil) {
        self.gyToken = token;
        DLog(@"token==%@",token);
    }
}

@end
